﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Messenger.DataAccess;

namespace Messenger.DataModel
{
    /// <summary>
    /// Db messages is present for table messages
    /// </summary>
    public class DBMessages : DBBase<Messages>
    {
        /// <summary>
        /// get new messages
        /// </summary>
        /// <param name="username"></param>
        /// <returns></returns>
        public IList<Messages> GetNewMessages(string username)
        {
            IList<Messages> data = null;
            data = this.ExecuteProcedureQuery<Messages>("GetNewMessages",
                new DBParam { Name = "@username", Value = username });
            return data;
        }
    }
}
